/**
 * 与报废相关的后端接口调用
 */
import instance from '@/utils/http'
import { addAssetScrap,approveAssetScrap,handlerAssetScrap,userGetAssetScrapList,approveGetAssetApplyList,handlerGetAssetApplyList } from '@/api/url'

 // 用户提交报废申请        
export const addAssetScrapAPI = (data) => {
    return instance({
        url: addAssetScrap,
        method: 'post',
        data: data
    })
}

// 管理员审核报废申请          
export const approveAssetScrapAPI = (data) => {
    return instance({
        url: approveAssetScrap,
        method: 'put',
        data: data
    })
}
//  处理员处理报废申请  
export const handlerAssetScrapAPI = (data) => {
    return instance({
        url: handlerAssetScrap,
        method: 'get',
        data: data
    })
}
//申请人查看报废表      
export const userGetAssetScrapListAPI = (data) => {
    return instance({
        url: userGetAssetScrapList,
        method: 'get',
        data: data
    })
}
//管理员查看报废表
export const approveGetAssetApplyListAPI = (data) => {
    return instance({
        url: approveGetAssetApplyList,
        method: 'post',
        data: data
    })
}

//处理员查看报废表
export const handlerGetAssetApplyListAPI = (data) => {
    return instance({
        url: handlerGetAssetApplyList,
        method: 'post',
        data: data
    })
}